import random, math, io, json, wordcloud, re, jieba, tkinter as tk, requests as rq
from tkinter import ttk, messagebox as msgbox
from urllib.request import urlopen
from PIL import Image, ImageTk
from bs4 import BeautifulSoup as bs
from matplotlib import pyplot as plt

placesId = ["beijing1", "shanghai2", "changsha148", "sanya61", "chongqing158",
            "hongkong38", "chengdu104", "haerbin151",
            "xian7", "guangzhou152", "hangzhou14"]
indexId = {"北京": 0, "上海": 1, "长沙": 2, "三亚": 3, "重庆": 4, "香港": 5,
           "成都": 6, "哈尔滨": 7, "西安": 8, "广州": 9, "杭州": 10}
area = ["北京", "上海", "长沙", "三亚", "重庆", "香港","成都", "哈尔滨", "西安", "广州", "杭州"]


Headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36"}


def get_a_page_url(self, PlaceId):
    return 'https://you.ctrip.com/sight/' + PlaceId + '/s0-p0.html'
